public class java5 {
    public static void main(String[] args) {
    int a = 24;
    int b =8;
    int c = 3;
    int yu=16;
    int disan = yu+b+c;
    int disi = yu+c+c;
    int diwu = yu+b+b;
    int diyi =c+c+c;
    int dier = b+b+b;
    double yi = diyi<dier?diyi:dier;
    double er = dier<disan?dier:disan;
    double san = disan<disi?disan:disi;
    double si = disi<diwu?disi:diwu;
    System.out.println("最少要花"+yi);
    }
}
